#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
RocketMQ配置文件
"""

# RocketMQ连接配置
ROCKETMQ_CONFIG = {
    # NameServer地址
    "namesrv_addr": "localhost:9876",
    
    # ACL认证配置
    "access_key": "123",
    "secret_key": "123",
    
    # 生产者配置
    "producer_group": "python_producer_group",
    
    # 消费者配置
    "consumer_group": "python_consumer_group",
    
    # 默认主题
    "default_topic": "test_topic",
    
    # 连接超时时间（秒）
    "timeout": 30,
    
    # 重试次数
    "retry_times": 3,
    
    # 消费者配置
    "consumer_config": {
        "orderly": True,  # 有序消费
        "message_tags": "S_C",  # 消息过滤标签
        "consume_timeout": 3000,  # 消费超时时间（毫秒）
    }
}

# 消息配置
MESSAGE_CONFIG = {
    # 默认消息标签
    "default_tags": "S_C",
    
    # 消息编码
    "encoding": "utf-8",
    
    # 消息压缩
    "compress": False,
}

# 日志配置
LOGGING_CONFIG = {
    "level": "INFO",
    "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
    "file": None,  # 设置为文件路径可输出到文件
} 